package com.itm.eventos.vista.dao.impl;

import javax.swing.SwingUtilities;
import javax.swing.text.JTextComponent;

import com.itm.eventos.vista.dao.LoggerActividadDao;



public class LoggerActividadDaoImpl implements LoggerActividadDao {
	
    private final JTextComponent target;
    
    public LoggerActividadDaoImpl(JTextComponent target) {
        this.target = target;
    }

	public void escribeMensaje(final String message) {
        SwingUtilities.invokeLater(new Runnable(){
            public void run() {
                target.setText(String.format("%s%s%n", target.getText(), message));
            }
        });
	}
}